import { legacy_createStore as createStore, combineReducers } from "redux";
import menu from "./modules/menu";
import LoginReducer from "./modules/login/reducer";
import user from './modules/user/reducer';
import { persistStore, persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage";
const persistConfig = {
    key:'root',
    storage,
};
const rootReducers = combineReducers({
    menu,
    LoginReducer,
    user
});
const persistedReducer = persistReducer(persistConfig, rootReducers);
const store = createStore(persistedReducer);
export const persisstore = persistStore(store);
export default store;
